package com.huan.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@RestController
@Controller
public class HelloController {
    //"/"--》/WEB-INF/templates/index.html
    @RequestMapping("/")//请求映射
//    @ResponseBody
    public String index(){
        //返回视图名称 决定最终跳转页面
        return "index";
    }
    @RequestMapping("/target")//请求映射
//    @ResponseBody
    public String target(){
        //返回视图名称 决定最终跳转页面
        return "target";
    }
}
